/*
 * PerfilJugador.java
 *
 * Created on 6 de mayo de 2009, 11:03 PM
 */

package gui;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JTextArea;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathExpressionException;
import org.xml.sax.SAXException;
import persistencia.PerfilJug;

/**
 *
 * @author  arquitectura
 */
public class PerfilJugador extends javax.swing.JFrame {
    private PerfilJug pj = new PerfilJug();
     private Home gc;

    public JTextArea getJtPerfilJugador() {
        return jtPerfilJugador;
    }

    public void setJtPerfilJugador(JTextArea jtPerfilJugador) {
        this.jtPerfilJugador = jtPerfilJugador;
    }
    
    /** Creates new form PerfilJugador */
    public PerfilJugador(String usuario,Home gc) {
       /* initComponents();
        this.gc = gc;
        try {            
            pj.entrar(this, usuario);
        } catch (ParserConfigurationException ex) {
            Logger.getLogger(PerfilJugador.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SAXException ex) {
            Logger.getLogger(PerfilJugador.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(PerfilJugador.class.getName()).log(Level.SEVERE, null, ex);
        } catch (XPathExpressionException ex) {
            Logger.getLogger(PerfilJugador.class.getName()).log(Level.SEVERE, null, ex);
        }*/
    }
    
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jtPerfilJugador = new javax.swing.JTextArea();
        jbMenuPrincipal = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jtPerfilJugador.setColumns(20);
        jtPerfilJugador.setRows(5);
        jScrollPane1.setViewportView(jtPerfilJugador);

        jbMenuPrincipal.setText("Menu Principal");
        jbMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbMenuPrincipalActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(45, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(289, Short.MAX_VALUE)
                .addComponent(jbMenuPrincipal)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                .addComponent(jbMenuPrincipal))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jbMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbMenuPrincipalActionPerformed
        // TODO add your handling code here:
        this.dispose();
        gc.setVisible(true);
    }//GEN-LAST:event_jbMenuPrincipalActionPerformed
    
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            public void run() {
//                new PerfilJugador().setVisible(true);
//            }
//        });
//    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JButton jbMenuPrincipal;
    private javax.swing.JTextArea jtPerfilJugador;
    // End of variables declaration//GEN-END:variables
    
}
